package com.jiexin.dao.cat;

import com.jiexin.model.ErrorSyncChange;
import org.apache.ibatis.annotations.Param;

/**
 * @Author: Jay_Liu
 * @Description:  db operation in cat site
 * @Trigger：
 * @Date: Created in 17:59 2018/9/7
 * @Modified By:
 */
public interface CATChangeMapper {

    //find Pid that have not been transferred
    Integer findNotTransferredChange();

    //update sync message for change
    void updateSyncMsgForChange(@Param("pid") Integer pid, @Param("state") Integer state, @Param("message") String message);

    /**
     * detect change with error sync state
     * @return pojo obj
     */
    ErrorSyncChange detectErrorSyncChange();

    /**
     * update mail state for change order
     * @param pid change primary ket
     * @param mailState mail state
     */
    void updateMailState(@Param("pid") Integer pid, @Param("mailState") Integer mailState);

}
